import request from '@/config/axios'

// 意向标签
export const countLevelByTask = async (params) => {
  return await request.get({ url: `/call/workbench/count-level-by-task-id`, params })
}
// 交互次数
export const countTalkByTask = async (params) => {
  return await request.get({ url: `/call/workbench/count-talk-by-task-id`, params })
}
//运营商
export const facilitatorByTask = async (params) => {
  return await request.get({ url: `/call/workbench/count-facilitator-by-task-id`, params })
}
// 通话峰值
export const hourByTask = async (params) => {
  return await request.get({ url: `/call/workbench/count-hour-task-id`, params })
}
// 地域分布
export const provincesByTask = async (params) => {
  return await request.get({ url: `/call/workbench/count-provinces-by-task-id`, params })
}
// 号码
export const taskPhonePage = async (params) => {
  return await request.get({ url: `/call/task-phone/page`, params })
}

// 获取事件列表
export const listenList = async () => {
  return await request.get({ url: `/call/listen-action/listen-list` })
}
// 根据事件获取可用动作
export const actionList = async (params) => {
  return await request.get({ url: `/call/listen-action/action-list`, params })
}
// 创建外呼任务动作绑定
export const createListenAction = async (data) => {
  return await request.post({ url: `/call/listen-action/create`, data })
}
// 修改外呼任务动作绑定
export const updateListenAction = async (data) => {
  return await request.put({ url: `/call/listen-action/update`, data })
}
// 外呼任务动作分页
export const listenActionPage = async (params) => {
  return await request.get({ url: `/call/listen-action/page`, params })
}
// 删除
export const deleteListenAction = async (id) => {
  return await request.delete({ url: `/call/listen-action/delete?id=` + id })
}
// 详情
export const getListenAction = async (id) => {
  return await request.get({ url: `/call/listen-action/get?id=` + id })
}
// 已推微信详情
export const templateRecord = async (params) => {
  return await request.get({ url: `/mp/template-record/page`, params })
}
